package com.zlm.custom.list;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sun.org.apache.bcel.internal.generic.NEW;

/**
 * @author zlm
 * @date 2025/4/27
 */
public class Main {

    public static void main(String[] args) throws JsonProcessingException {
        //testArrayList();
        Demo demo = new Demo();
        demo.setName("zlm");
        demo.setAddProps("age",18);
        ObjectMapper objectMapper = new ObjectMapper();
        System.out.println(objectMapper.writeValueAsString(demo));


    }

    public static void testArrayList(){
        List<String> list = new LinkedList<>();

        for (int i = 0; i < 30; i++) {
            list.add(i+"");
        }
        System.out.println(list.size());
        list.remove(2);
        System.out.println(list.get(2));
        list.remove("3");
        System.out.println(list.get(2));
        list.forEach(System.out::println);
    }
}
